<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <link rel="stylesheet" href="http://cdn.staticfile.org/cesium/1.69.0/Widgets/widgets.css">
    <link rel="stylesheet" href="../css//index.css">
</head>

<body>
    <div class="fun-menu">
        <button onclick="addPostStage()">扫描器(+)</button>
        <button onclick="removePostStage()">扫描器(-)</button>
    </div>
    <div id=cesiumContainer></div>

    <script src="http://cdn.staticfile.org/cesium/1.69.0/Cesium.js"></script>
    <script src="../libs/cpc/index.js"></script>
    <script>
        var postStage = null;
        const map = new cpc.Map({
            container: "cesiumContainer",
            camera: { "position": { "x": 119.31613105052548, "y": 26.02430813352919, "z": 9850.877173186504 }, "angle": { "heading": 2.97, "pitch": -87.98, "roll": 0 } },
            baseMaps: [
                "http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer",
            ]
        });

        function addPostStage(type) {
            var option1 = {
                center: {
                    x: 119.3006147,
                    y: 26.0316619,
                    z: 0
                },
                radius: 500,
                duration: 4000,
                scanColor: new Cesium.Color(0.0, 1.0, 0.0, 1)
            };
            postStage = new cpc.RadarScanPostStage(option1);
            map.add(postStage)
        }
        function removePostStage() {
            map.remove(postStage);
        }
    </script>
</body>

</html>